package trabajoISW2.presentation.shared;

import trabajoISW2.domain.implementations.CreditCard;

public class CreditCardMapper {
	


	public static CreditCardDTO createDTO(CreditCard cc){
		CreditCardDTO dto = new CreditCardDTO (cc.getType(), cc.getNumber(),
				cc.getCvv(), cc.getMonth(), cc.getYear(), cc.getUser().getUserId());
		return dto;
		
	}
	public static CreditCard createDomainObject(CreditCardDTO dto){
		CreditCard cc = new CreditCard(dto.getType(), dto.getNumber(), dto.getCvv(), dto.getMonth(), dto.getYear());
		return cc;
	}
	

	
	


}
